package com.hdoit.pisces.web.other.controller;



import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.hdoit.pisces.logical.rel.model.Relative;
import com.hdoit.pisces.logical.rel.service.IRelativeService;
import com.tennetcn.component.web.BaseController;

@Controller
@RequestMapping(value="/admin/")
public class MainnewController_WX extends BaseController {
	
	@Override
	public String getRoutePath() {
		return "areas/admin/";
	}
	
	private IRelativeService relativeService;
	
	public	IRelativeService getRelativeService() {
		return relativeService;
	}
	
	@Resource
	public void setUserService(IRelativeService relativeService){
		this.relativeService=relativeService;
	}
	
	private final String mainViewName="relative_listweixin";
	
	@RequestMapping(value = mainViewName, method = { RequestMethod.GET,
			RequestMethod.POST })
	public String index(Model model) {
		List<Relative> relatives = relativeService.queryList();
		model.addAttribute("relatives", relatives);
		return view(mainViewName);
	}

	
}
	